#ifndef WEATHER_LINE_LABEL_H
#define WEATHER_LINE_LABEL_H

#include <QObject>
#include <QWidget>
#include <QDebug>
#include <QApplication>
#include <QMouseEvent>
#include <QPainter>
#include <QBrush>
#include <QPaintEvent>
#include <QPen>
#include <QColor>
#include <QRect>
#include <QPoint>
#include <QLabel>
class weather_line_label : public QLabel
{
    Q_OBJECT
public:
    explicit weather_line_label(QWidget *parent = nullptr);
private:
    int coldest_data[7] = {0}; // 用于存放一周的最低气温数据
    int hotest_data[7] = {0}; // 用于存放一周的最高气温数据
    int coldest_hotest = 0; // 用于判断当前数据是一天当中的最高气温，还是最低气温
protected:
    void paintEvent(QPaintEvent *event);
public:
    void set_coldest_data(const int * data)
    {
        for (int i = 0; i < 7; i++)
        {
            this->coldest_data[i] = data[i];
        }
    }

    void set_hotest_data(const int * data)
    {
        for (int i = 0; i < 7; i++)
        {
            this->hotest_data[i] = data[i];
        }
    }
signals:

};

#endif // WEATHER_LINE_LABEL_H
